<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:f="http://java.sun.com/jsf/core">
    <ui:composition template="templates/template.xhtml">
        <h:head>
            <title>Seja bem-vindo ao ThreeDs!</title>
        </h:head>
        <ui:define name="content">
            <h:body>
                <h:form>
                    <center>
                        <!-- Painel -->
                        <p:panel id="panel" header="#{msgs.tabela}">  
                            <h:panelGrid columns="3">  

                                <h:outputLabel for="nome" value="#{msgs.nome}: *" />  
                                <p:inputText id="nome" label="Nome" required="true" requiredMessage="#{msgs.campoobrigatorio}"
                                             value="" size="50" maxlength="100" />
                                <p:message for="nome" />  

                                <h:outputLabel for="descricao" value="#{msgs.descricao}: *"/>
                                <p:inputTextarea id="e-mail" label="descrcao" style="width: 423px" required="true"  requiredMessage="#{msgs.campoobrigatorio}"
                                                 value="#{esquemaBean.esquema.descricao}" />
                            </h:panelGrid>
                        </p:panel>



                        <p:panel header="#{msgs.atributos}">
                            <h:panelGrid columns="3">
                               

                                <h:outputLabel for="atributonovatabela" value="#{msgs.atributonovatabela}: *"/> 
                                <p:inputTextarea value="" id="atributonovatabela" 
                                                 label="atributonovatabela" required="true"  requiredMessage="#{msgs.campoobrigatorio}"/>
                                <p:message for="atributonovatabela" />  

                                <h:outputLabel for="atributdicionario" value="#{msgs.atributodicionario}: *"/> 
                                <p:inputTextarea value="#{esquemaBean.esquema.nomeBd}" id="atributodicionario" 
                                                 label="atributodicionario" required="true"  requiredMessage="#{msgs.campoobrigatorio}"/>
                                <p:message for="atributodicionario" /> 

                                </h:panelGrid>
                                <h:panelGrid>
                                    <h:outputLabel for="bancodados" value="#{msgs.tipochave}: *"/> 
                                    <br>
                                        <input type="checkbox" name="Entidade" value="ON" checked="checked" /> #{msgs.entidade}
                                        <input type="checkbox" name="Atributo" value="ON" checked="checked" /> #{msgs.atributo}
                                        <input type="checkbox" name="Relacionamento" value="ON" checked="checked"/> #{msgs.relacionamento}
                                    </br>
                                </h:panelGrid>
                            <br></br>
                            <h:panelGrid columns="3">
                            <h:outputLabel for="observacoes" value="#{msgs.observacoes}: *"/> 
                            <p:inputTextarea value="#{esquemaBean.esquema.nomeBd}" style="width: 423px" id="observacoes" 
                                                 label="observacoes" required="true"  requiredMessage="#{msgs.campoobrigatorio}"/>
                                <p:message for="observacoes" /> 
                                
                                <h:outputLabel for="exemplos" value="#{msgs.exemplo}: *"/> 
                                <p:inputTextarea value="#{esquemaBean.esquema.nomeBd}" style="width: 423px" id="exemplo" 
                                                 label="atributodicionario" required="true"  requiredMessage="#{msgs.campoobrigatorio}"/>
                                <p:message for="exemplo" /> 
                            </h:panelGrid>
                            
                        </p:panel>              


                        <!-- Botões -->



                        <br>
                            <p:commandButton id="salvar" value="#{msgs.salvar}" actionListener="#{tabelaBean.salvar()}" update="panel,resultado" 
                                             image="ui-icon ui-icon-disk" title="Salvar" process="@this,panel"/>
                            
                            <p:commandButton id="cancelar" value="#{msgs.cancelar}"  update="panel,resultado" 
                                            title="cancelar" process="@this,panel"/>



                        </br>

                        <br></br>
                    </center>
                </h:form>



            </h:body>
        </ui:define>

    </ui:composition>
</html>